3.1.11 \(\int (c+d x) \sinh ^2(a+b x) \, dx\) [11]

Optimal. Leaf size=55 \[ -\frac {c x}{2}-\frac {d x^2}{4}+\frac {(c+d x) \cosh (a+b x) \sinh (a+b x)}{2 b}-\frac {d \sinh ^2(a+b x)}{4 b^2} \]

[Out]

-1/2*c*x-1/4*d*x^2+1/2*(d*x+c)*cosh(b*x+a)*sinh(b*x+a)/b-1/4*d*sinh(b*x+a)^2/b^2

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3391} \begin {gather*} -\frac {d \sinh ^2(a+b x)}{4 b^2}+\frac {(c+d x) \sinh (a+b x) \cosh (a+b x)}{2 b}-\frac {c x}{2}-\frac {d x^2}{4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Sinh[a + b*x]^2,x]

[Out]

-1/2*(c*x) - (d*x^2)/4 + ((c + d*x)*Cosh[a + b*x]*Sinh[a + b*x])/(2*b) - (d*Sinh[a + b*x]^2)/(4*b^2)

Rule 3391

Int[((c_.) + (d_.)*(x_))*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d*((b*Sin[e + f*x])^n/(f^2*n^
2)), x] + (Dist[b^2*((n - 1)/n), Int[(c + d*x)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[b*(c + d*x)*Cos[e + f*x
]*((b*Sin[e + f*x])^(n - 1)/(f*n)), x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int (c+d x) \sinh ^2(a+b x) \, dx &=\frac {(c+d x) \cosh (a+b x) \sinh (a+b x)}{2 b}-\frac {d \sinh ^2(a+b x)}{4 b^2}-\frac {1}{2} \int (c+d x) \, dx\\ &=-\frac {c x}{2}-\frac {d x^2}{4}+\frac {(c+d x) \cosh (a+b x) \sinh (a+b x)}{2 b}-\frac {d \sinh ^2(a+b x)}{4 b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.13, size = 52, normalized size = 0.95 \begin {gather*} \frac {-d \cosh (2 (a+b x))+2 b (-2 a c-b x (2 c+d x)+(c+d x) \sinh (2 (a+b x)))}{8 b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Sinh[a + b*x]^2,x]

[Out]

(-(d*Cosh[2*(a + b*x)]) + 2*b*(-2*a*c - b*x*(2*c + d*x) + (c + d*x)*Sinh[2*(a + b*x)]))/(8*b^2)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(102\) vs. \(2(47)=94\).
time = 0.42, size = 103, normalized size = 1.87

method result size
risch \(-\frac {d \,x^{2}}{4}-\frac {c x}{2}+\frac {\left (2 b d x +2 b c -d \right ) {\mathrm e}^{2 b x +2 a}}{16 b^{2}}-\frac {\left (2 b d x +2 b c +d \right ) {\mathrm e}^{-2 b x -2 a}}{16 b^{2}}\) \(64\)
derivativedivides \(\frac {\frac {d \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (b x +a \right )\right )}{4}\right )}{b}-\frac {d a \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}+c \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}\) \(103\)
default \(\frac {\frac {d \left (\frac {\left (b x +a \right ) \cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {\left (b x +a \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (b x +a \right )\right )}{4}\right )}{b}-\frac {d a \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}+c \left (\frac {\cosh \left (b x +a \right ) \sinh \left (b x +a \right )}{2}-\frac {b x}{2}-\frac {a}{2}\right )}{b}\) \(103\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*sinh(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/b*(d/b*(1/2*(b*x+a)*cosh(b*x+a)*sinh(b*x+a)-1/4*(b*x+a)^2-1/4*cosh(b*x+a)^2)-d/b*a*(1/2*cosh(b*x+a)*sinh(b*x
+a)-1/2*b*x-1/2*a)+c*(1/2*cosh(b*x+a)*sinh(b*x+a)-1/2*b*x-1/2*a))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 88, normalized size = 1.60 \begin {gather*} -\frac {1}{16} \, {\left (4 \, x^{2} - \frac {{\left (2 \, b x e^{\left (2 \, a\right )} - e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )}}{b^{2}} + \frac {{\left (2 \, b x + 1\right )} e^{\left (-2 \, b x - 2 \, a\right )}}{b^{2}}\right )} d - \frac {1}{8} \, c {\left (4 \, x - \frac {e^{\left (2 \, b x + 2 \, a\right )}}{b} + \frac {e^{\left (-2 \, b x - 2 \, a\right )}}{b}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sinh(b*x+a)^2,x, algorithm="maxima")

[Out]

-1/16*(4*x^2 - (2*b*x*e^(2*a) - e^(2*a))*e^(2*b*x)/b^2 + (2*b*x + 1)*e^(-2*b*x - 2*a)/b^2)*d - 1/8*c*(4*x - e^
(2*b*x + 2*a)/b + e^(-2*b*x - 2*a)/b)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 64, normalized size = 1.16 \begin {gather*} -\frac {2 \, b^{2} d x^{2} + 4 \, b^{2} c x + d \cosh \left (b x + a\right )^{2} - 4 \, {\left (b d x + b c\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + d \sinh \left (b x + a\right )^{2}}{8 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sinh(b*x+a)^2,x, algorithm="fricas")

[Out]

-1/8*(2*b^2*d*x^2 + 4*b^2*c*x + d*cosh(b*x + a)^2 - 4*(b*d*x + b*c)*cosh(b*x + a)*sinh(b*x + a) + d*sinh(b*x +
 a)^2)/b^2

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 126 vs. \(2 (49) = 98\).
time = 0.15, size = 126, normalized size = 2.29 \begin {gather*} \begin {cases} \frac {c x \sinh ^{2}{\left (a + b x \right )}}{2} - \frac {c x \cosh ^{2}{\left (a + b x \right )}}{2} + \frac {d x^{2} \sinh ^{2}{\left (a + b x \right )}}{4} - \frac {d x^{2} \cosh ^{2}{\left (a + b x \right )}}{4} + \frac {c \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{2 b} + \frac {d x \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{2 b} - \frac {d \cosh ^{2}{\left (a + b x \right )}}{4 b^{2}} & \text {for}\: b \neq 0 \\\left (c x + \frac {d x^{2}}{2}\right ) \sinh ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sinh(b*x+a)**2,x)

[Out]

Piecewise((c*x*sinh(a + b*x)**2/2 - c*x*cosh(a + b*x)**2/2 + d*x**2*sinh(a + b*x)**2/4 - d*x**2*cosh(a + b*x)*
*2/4 + c*sinh(a + b*x)*cosh(a + b*x)/(2*b) + d*x*sinh(a + b*x)*cosh(a + b*x)/(2*b) - d*cosh(a + b*x)**2/(4*b**
2), Ne(b, 0)), ((c*x + d*x**2/2)*sinh(a)**2, True))

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 63, normalized size = 1.15 \begin {gather*} -\frac {1}{4} \, d x^{2} - \frac {1}{2} \, c x + \frac {{\left (2 \, b d x + 2 \, b c - d\right )} e^{\left (2 \, b x + 2 \, a\right )}}{16 \, b^{2}} - \frac {{\left (2 \, b d x + 2 \, b c + d\right )} e^{\left (-2 \, b x - 2 \, a\right )}}{16 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*sinh(b*x+a)^2,x, algorithm="giac")

[Out]

-1/4*d*x^2 - 1/2*c*x + 1/16*(2*b*d*x + 2*b*c - d)*e^(2*b*x + 2*a)/b^2 - 1/16*(2*b*d*x + 2*b*c + d)*e^(-2*b*x -
 2*a)/b^2

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 60, normalized size = 1.09 \begin {gather*} -\frac {\frac {d\,\mathrm {cosh}\left (2\,a+2\,b\,x\right )}{2}+b^2\,d\,x^2-b\,c\,\mathrm {sinh}\left (2\,a+2\,b\,x\right )+2\,b^2\,c\,x-b\,d\,x\,\mathrm {sinh}\left (2\,a+2\,b\,x\right )}{4\,b^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(a + b*x)^2*(c + d*x),x)

[Out]

-((d*cosh(2*a + 2*b*x))/2 + b^2*d*x^2 - b*c*sinh(2*a + 2*b*x) + 2*b^2*c*x - b*d*x*sinh(2*a + 2*b*x))/(4*b^2)

________________________________________________________________________________________